﻿function show(licznik, showhide)
{
  var obj = document.getElementById("tooltipDiv");
  if(!obj) return;
  if(showhide == 'show'){
    var width = krokX + parseInt(obj.style.width) + "px";
    var height = krokY + parseInt(obj.style.height) + "px";
    obj.style.width = width;
    obj.style.height = height;
  }
  else{
    var width = Math.floor(parseInt(obj.style.width) - krokX);
    var height = Math.floor(parseInt(obj.style.height) - krokY);
    if(width < 0) width = 0;
    if(height < 0) height = 0;
    obj.style.width = width + "px";
    obj.style.height = height + "px";
  }
  if(--licznik > 0){
    timerId = setTimeout("show("+licznik+",'"+showhide+"');", timeout);
  }
  else if(showhide != 'show'){
    obj.style.display = "none";
  }
}